﻿
Namespace ind.tools
    ''' <summary>
    ''' tools for manipulation of files
    ''' </summary>
    ''' <remarks></remarks>
    Public Class FileDataHelper

        ''' <summary>
        ''' Open a file using asociated application. There is no validation
        ''' </summary>
        ''' <param name="filepath"></param>
        ''' <remarks></remarks>
        Public Shared Sub openFile(filepath As String)
            Try
                If filepath Is Nothing OrElse filepath = "" Then
                    Throw New Exception("Filepath can not be empty")
                End If
                Dim p As New System.Diagnostics.ProcessStartInfo()
                p.WindowStyle = ProcessWindowStyle.Hidden
                p.FileName = filepath
                p.UseShellExecute = True
                System.Diagnostics.Process.Start(p)
            Catch ex As Exception
                Throw ex
            End Try

        End Sub

    End Class
End Namespace

